﻿using UnityEngine;
using System.Collections;

public class creditos : MonoBehaviour {

	GameObject objNome;
	GameObject objPoo;
	GameObject objFatec;
	// Use this for initialization
	void Start () {
		objNome = GameObject.Find("nome");
		objPoo = GameObject.Find("poo");
		objFatec = GameObject.Find("fatecpg");
	}
	
	// Update is called once per frame
	void Update () {
		objNome.transform.Translate (Vector3.down * Time.deltaTime);
		objPoo.transform.Translate (Vector3.down * Time.deltaTime);
		objFatec.transform.Translate (Vector3.down * Time.deltaTime);
		if (objNome.transform.position.y < -12) {
			objNome.transform.position = new Vector3(-1.90f, 12, 1.206f);
		}
		if (objPoo.transform.position.y < -11) {
			objPoo.transform.position = new Vector3(-2.80f, 11, 1.206f);
		}
		if (objFatec.transform.position.y < -10) {
			objFatec.transform.position = new Vector3(-1.845f, 10, 1.206f);
		}
	}
}
